package com.mjk.common.core.jdbc.ibatis.typehandler.handler;


import com.mjk.common.core.jdbc.ibatis.typehandler.BaseHandler;
import com.mjk.common.util.ObjectUtils;

import java.lang.reflect.Field;

public class ShortHandler implements BaseHandler<Short> {

	@Override
	public String resovleToString(Field f,Short t) {			
		if(ObjectUtils.isEmpty(t)){
            return null;
		}
		return Short.toString(t);
	}

	@Override
	public Short resovleResult(Object o) {
		return Short.valueOf(o.toString());
	}

}
